package me.aip.mov.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import me.aip.mov.entity.ChatFriends;
import me.aip.mov.mapper.ChatFriendsMapper;
import me.aip.mov.service.IChatFriendsService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author aip9105
 * @since 2022-02-12
 */
@Service
public class ChatFriendsServiceImpl extends ServiceImpl<ChatFriendsMapper, ChatFriends> implements IChatFriendsService {

    @Override
    public List<ChatFriends> findAllFriends(String userId) {
        QueryWrapper<ChatFriends> queryWrapper = new QueryWrapper();
        queryWrapper.eq("userid",userId);
        queryWrapper.eq("isdel",0);
        return this.baseMapper.selectList(queryWrapper);
    }
}
